package com.dd.ent.car.common.player;

import android.view.SurfaceHolder;

import java.util.concurrent.atomic.AtomicReference;

/**
 * Author:LiuJianSheng
 * Date:2016/7/27
 */
public class SetDisplayMessage extends PlayerMessage {
    private SurfaceHolder surfaceHolder;

    public SetDisplayMessage(MediaPlayerWrapper mediaPlayer, AtomicReference<PlayerMessageState> messageState, SurfaceHolder surfaceHolder) {
        super(mediaPlayer);
        this.surfaceHolder = surfaceHolder;
    }

    @Override
    public void runMessage() {
        getMediaPlayer().setDisplay(surfaceHolder);
    }
}
